import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('../views/home/index.vue')
    },
    // 线索管理
    {
      path: '/clue/clue-list',
      name: 'clue-list',
      component: () => import('../views/clue/list.vue')
    },
    {
      path: '/clue/clue-pool',
      name: 'clue-pool',
      component: () => import('../views/clue/pool.vue')
    },
    // 商机管理
    {
      path: '/business/business-list',
      name: 'business-list',
      component: () => import('../views/business/list.vue')
    },
    {
      path: '/business/public-pool',
      name: 'public-pool',
      component: () => import('../views/business/pool.vue')
    },
    // 客户管理
    {
      path: '/customer',
      name: 'customer',
      component: () => import('../views/customer/index.vue')
    },
    // 资源管理
    {
      path: '/resource/course',
      name: 'course',
      component: () => import('../views/resource/course.vue')
    },
    {
      path: '/resource/activity',
      name: 'activity',
      component: () => import('../views/resource/activity.vue')
    },
    // 系统管理
    {
      path: '/system/department',
      name: 'department',
      component: () => import('../views/system/dept.vue')
    },
    {
      path: '/system/role',
      name: 'role',
      component: () => import('../views/system/role.vue')
    },
    {
      path: '/system/user',
      name: 'user',
      component: () => import('../views/system/user.vue')
    },
    {
      path: '/system/log',
      name: 'log',
      component: () => import('../views/system/log.vue')
    }
  ],
})

export default router
